<template>
	<div class="comp-new">
		<el-form ref="handleForm" :model="handleForm" :label-width="120*scale+'px'">
			<el-form-item label="信息确认：">
                <el-radio-group v-model="handleForm.infoconfirm">
                    <el-radio label="1">报警</el-radio>
                    <el-radio label="2">误报</el-radio>
                    <el-radio label="3">测试</el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="处置人员：" prop="handlePerson" :rules="[{ required: true, message: '请输入处置人员', trigger: 'change' }]">
                <el-input placeholder="请输入" v-model.trim="handleForm.handlePerson"></el-input>
            </el-form-item>
            <el-form-item label="备注：">
                <el-input placeholder="请输入" type="textarea" v-model.trim="handleForm.handleRemark"></el-input>
            </el-form-item>
		</el-form>
	</div>	
</template>
<script>
import { mapState } from 'vuex'
export default {
	name: 'newRecordAccount',
	props: {
		scale: {
			type: Number,
			default: 1
		},
	},
	data () {
		return {
			handleForm: {
				infoconfirm: '1',
                handlePerson:'',
                handleRemark:''
			},
		}
	},
	methods: {
		submitAction () {
			this.$refs['handleForm'].validate((valid) => {
				if (valid) {
					this.$emit('submitting')
					let params = Object.assign({},this.handleForm)
					this.$post('/fireFightingIOT/historicalAlarmInfo/oneClickHandle', params).then( data => {
						this.$message.success('处置完成')
						this.$emit('success',data);
					}, error => {
						this.$emit('fail');
						if(error.msg){
							this.$message.error(error.msg);
						}
					})
				} else {
					return false;
				}
			});
		},
	},
}
</script>